var Test = angular.module('Test',[]);

Test.controller('TestCtrl',function($scope){
    $scope.data = [[[0,1],[1,5],[2,2]]];
});
Test.directive('chart',function(){
    return{
        restrict:'E',
        link:function(scope,elem,attrs){
            var data = scope[attrs.ngModel];
            $.plot(elem,data,{});
            elem.show();
        }
    }
});